-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: agent get SPD syncly #558
base: main
Are you sure you want to change the base?
feat: agent get SPD syncly #558
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #558 +/- ##
==========================================
- Coverage 56.06% 55.90% -0.17%
==========================================
Files 534 534
Lines 49807 49828 +21
==========================================
- Hits 27924 27856 -68
- Misses 18325 18420 +95
+ Partials 3558 3552 -6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
eb05ece
to
a2ba65b
Compare
90f3a7e
to
0ce43ec
Compare
@@ -159,6 +161,28 @@ func (s *spdFetcher) getSPDByNamespaceName(_ context.Context, namespace, name st | |||
currentSPD := s.spdCache.GetSPD(key, true) | |||
if currentSPD != nil { | |||
return currentSPD, nil | |||
} else if s.getFromRemote { | |||
klog.Infof("[spd-manager] need to get spd %s from remote", key) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this logic in the getSPDByNamespaceName can be abstracted into a function with the logic in sync.
What type of PR is this?
Features
What this PR does / why we need it:
get spd from remote if not in cache when GetFromRemote is true
Which issue(s) this PR fixes:
Special notes for your reviewer: